<form data-dojo-type="dijit.form.Form">
<script type="dojo/method" data-dojo-event="submitForm" data-dojo-args="form,e,conf">
     doSubmit({
        form: form,
        event: e,
        url: '{{ request.path }}',
        confirm: conf
     });
</script>
<script type="dojo/event" data-dojo-event="onSubmit" data-dojo-args="e">
this.submitForm(this, e);
</script>
<table class="form">
{% if form %}
    {% csrf_token %}
    {{ form }}
{% endif %}
    {% block message %}
    {% if related_num > 0 %}
    <tr>
        <td>{% blocktrans count related_num as counter %}There is {{ related_num }} related entry that will also be deleted as it depend upon this item{% plural %}There are {{ related_num }} related entries that will also be deleted as they depend upon this item{% endblocktrans %}:
            <ul>
                {% for name, objs in related.items %}
                    <li>{{ name }}: {% for obj in objs %}{{ obj }}{% if not forloop.last %}, {% endif %}{% endfor %}</li>
                {% endfor %}
            </ul>
        </td>
    </tr>
    {% endif %}
    <tr>
        <td>{% blocktrans with verbose_name=verbose_name object=object %}Are you sure you want to delete {{ verbose_name }} {{ object }}?{% endblocktrans %}</td>
    </tr>
    {% endblock %}
    <tr>
        <td>
            <button id="btn_{{ model_name }}_Ok" class="submitform" data-dojo-type="dijit.form.Button" data-dojo-props="type: 'submit'">
                {% trans "Yes" %}
            </button>
            <button id="btn_{{ model_name}}_Cancel" data-dojo-type="dijit.form.Button" class="cancelform">
                {% trans "Cancel" %}
                <script type="dojo/method" data-dojo-event="onClick" data-dojo-args="evt">
                    cancelDialog(this);
                </script>
            </button>
        </td>
    </tr>
</table>
</form>
